Skip to content

Update Dependencies Nov 25 (auto) - #588

Closed
maread99 wants to merge 2 commits into
masterfrom
claude/ecstatic-cray-v8am8o
Closed

maread99 wants to merge 2 commits into
masterfrom
claude/ecstatic-cray-v8am8o

Conversation

@maread99

@maread99 maread99 commented Nov 25, 2026 •

Copy link
Copy Markdown
Owner

🤖 Generated by Claude Code (agent autonomy 5/5)

Summary

Routine dependency update. Upgrades uv.lock to the latest compatible dependency versions, bumps astral-sh/setup-uv and the ruff-pre-commit hook, and makes the revisions needed to support the new versions:

  • exchange_calendars 4.13.3 corrects two calendars: it adds two 2023 HKEX closures (typhoon, rainstorm) to XHKG, and fixes CMES's close time, which introduces a ~1 hour daily maintenance gap that CME globex sessions didn't previously have.
  • Fixes a latent bug this exposed in PTIntraday.sessions: an unhandled IndexError instead of the documented pd.NaT for a composite-calendar minute outside any session.
  • Updates test fixtures/assertions affected by the two calendar corrections.

One test remains failing (confirmed across all 6 CI matrix jobs): TestDownsampleIntraday::test_excess_row_handling_and_lengths. It depends on CMES and XNYS sessions abutting with no gap — a premise the CMES correction invalidates for every date, not just a fixture-specific quirk. Fixing it needs a redesign around a different scenario that still produces a genuine overlap, which is a judgment call beyond a routine dependency bump. I've left it failing rather than skip or paper over it, and opened #589 with the full investigation and suggested next steps.


  • I've reviewed/revised the PR title (if unticked, treat it as an agent's unchecked title).
  • I've reviewed/revised the summary above and it covers what a reviewer needs to know (if unticked, treat it as an agent's unchecked summary).

Agent autonomy

This PR was raised by a scheduled, unattended run of the dependencies-management skill; no user steered the session, so I made every design and implementation decision myself.

Contributor review

I have reviewed the (tick all that apply):

  • full diff across the code base
  • full diff across the test suite
  • commit messages
  • agent's detail below
Claude Sonnet 5 Medium

Summary

  • Updated uv.lock / requirements.txt via uv lock --upgrade.
  • Bumped astral-sh/setup-uv from v10.3.3 to v10.4.0 in all three workflow files (actions/checkout and release-drafter/release-drafter were already pinned to their latest major-version tags).
  • Bumped ruff-pre-commit from v0.17.4 to v0.17.6 via uv run pre-commit autoupdate.
  • Fixed PTIntraday.sessions's composite-calendar branch: it indexed the result of calendar.minute_to_sessions(...) with [0] without checking for emptiness, raising IndexError instead of assigning pd.NaT as documented. This was latent until the CMES close-time correction created non-trading minutes within the price table's session range.
  • Removed two rows from the 9988.HK daily csv test resource for dates XHKG is now (correctly) recognised as closed.
  • Excluded ES=F from TestIndicesTradingStatus::test_intraday_pt, test_composite_intraday_pt and TestDownsampleIntraday::test_reindex_equivalence's exact-alignment assertions, consistent with the pre-existing exclusion in test_daily_pt ("do not include ES=F as trading does not fully align with calendar").
  • Fixed a pre-existing typo in PricesCsvIgnoredUnalignedIndicesWarning's message ("...evaluated index and: have therefore..." → "...evaluated index and have therefore...") and the tests asserting on it.

Known unresolved failure

TestDownsampleIntraday::test_excess_row_handling_and_lengths builds a CompositeCalendar([cmes, xnys]) and asserts session_cc_close == next_session_cc_open for session "2021-12-21", i.e. that CME and XNYS sessions abut with zero gap, in order to exercise PTIntraday._consolidate_resampled_duplicates's overlap-handling logic. The CMES close-time fix moves close one hour earlier (16:00 → the real Chicago time), which now matches CME's genuine daily settlement/maintenance halt — confirmed against the underlying Yahoo price data, which has zero-volume, flat-price placeholder rows for exactly that hour. This gap is unconditional (close_times = ((None, time(16)),)), so no date escapes it, and I could not find a realistic alternative calendar pairing in exchange_calendars that still abuts with zero gap to substitute for this scenario. This failed identically across all 6 CI matrix jobs (ubuntu/macos/windows × Python 3.10/3.14), confirming it isn't an OS or Python-version quirk. Resolving this needs a decision on how to re-ground the test (e.g. a different calendar pair, or test infrastructure that constructs a synthetic calendar), which is beyond what a dependency bump should decide unilaterally — see #589 for the full investigation and suggested next steps.

Also noticed in passing (not fixed, out of scope)

  • composite_intraday_pt's fixture docstring says it's recreated with symbols = ["MSFT", "AZN.L", "BTC-USD"], but the actual resource's columns are MSFT, AZN.L, ES=F. The docstring looks stale.
  • src/market_prices/prices/csv.py has about 100 pre-existing mypy errors, unrelated to this change and spread throughout the file — this file does not currently type-check cleanly.

Co-Authored-By: Claude Sonnet 5 noreply@anthropic.com

Upgrade the lock file to latest compatible dependency versions, pin
astral-sh/setup-uv to its latest release, and bump the ruff-pre-commit
hook to its latest release.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
exchange_calendars 4.13.3 adds two HKEX closures to the XHKG calendar
(for a typhoon and a rainstorm, both in Sep 2023) and corrects the
CMES calendar's close time, introducing a daily maintenance gap that
CME globex sessions did not previously have.

- pt.py: `PTIntraday.sessions` raised an unhandled IndexError, rather
  than assigning pd.NaT as documented, for a composite-calendar minute
  that does not fall within a session when `direction` is None. This
  was latent until the CMES correction introduced minutes that fall
  within this gap.
- Remove two now-recognised-as-non-trading-day rows from the 9988.HK
  daily csv test resource (XHKG was closed on both dates).
- Exclude ES=F from assertions that require a price table's indices to
  align exactly with the CMES calendar, consistent with the existing
  exclusion applied for the same reason in `test_daily_pt`.
- Fix a typo in `PricesCsvIgnoredUnalignedIndicesWarning`'s message.

`TestDownsampleIntraday::test_excess_row_handling_and_lengths` remains
failing: it relies on CMES and XNYS sessions abutting with no gap, a
premise the CMES correction invalidates for every date, so the test
needs redesigning around a scenario that still exhibits a genuine
overlap.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@maread99 maread99 added the dependencies Pull requests that update a dependency file label Nov 25, 2026 — with Claude

Copy link
Copy Markdown
Owner Author

The build-and-test jobs that have failed so far (macos-latest, 3.10 and ubuntu-latest, 3.14) both fail on the same single test, TestDownsampleIntraday::test_excess_row_handling_and_lengths — the known, already-documented failure described in this PR's description (see "Known unresolved failure" in the fold below). No other test fails in either run. I'll keep watching the remaining matrix jobs, but expect them to show the same single failure since it isn't platform- or Python-version-dependent.


Generated by Claude Code

Copy link
Copy Markdown
Owner Author

All 6 build-and-test matrix jobs have completed, each failing on exactly the same single test (TestDownsampleIntraday::test_excess_row_handling_and_lengths), confirming it isn't OS- or Python-version-specific. pre-commit passed.

I've opened #589 with the full investigation (cause, what I tried, suggested next steps) for this failure, since fixing it properly needs a design decision beyond what a dependency bump should make unilaterally. Nothing further for me to do here without that decision.


Generated by Claude Code

@maread99

Copy link
Copy Markdown
Owner Author

Superseded by #593. Note that some of the identified issues were fixed in #591.

@maread99 maread99 closed this Nov 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants